package kr.hkit.powerjava.chapter17;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.CardLayout;
import javax.swing.JTabbedPane;

public class CardLaySwingAll extends JFrame {

	private JPanel contentPane;
	private JTabbedPane tabbedPane;
	private ImageLabelSwingCom panelImageLabel;
	private CheckBoxSwingCom panelCheckBox;
	private RadioButtonSwingCom panelRadioButton;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					CardLaySwingAll frame = new CardLaySwingAll();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public CardLaySwingAll() {
		initialize();
	}
	private void initialize() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(new CardLayout(0, 0));
		
		tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		contentPane.add(tabbedPane, "name_26019477305247");
		
		panelImageLabel = new ImageLabelSwingCom();
		tabbedPane.addTab("이미지 레이블", null, panelImageLabel, null);
		
		panelCheckBox = new CheckBoxSwingCom();
		tabbedPane.addTab("체크박스", null, panelCheckBox, null);
		
		panelRadioButton = new RadioButtonSwingCom();
		tabbedPane.addTab("라디오버튼", null, panelRadioButton, null);
	}

}
